home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / UTILITY / MUTATE10.ARJ / README.DOC < prev   
Text File  |  1991-03-14  |  10KB  |  214 lines

  1. MUTATE - File mutation utility - Version 1.0 - (c) 1991, Hugh R. Kern
  2.  
  3. Usage: MUTATE ifname[,ifname...] [-O=outpath] [-Icasesense]
  4.                [-S0=srcstr0 [-S1=srcstr1 [...]]]
  5.                [-D0=dststr0 [-D1=dststr1 [...]]]
  6.  
  7. Where: ifname -- is a file specification for the files to be converted
  8.           (wildcards are allowed ie. "*.h")
  9.  
  10.        casesense -- case sensitivity '+' on, '-' off (default on)
  11.  
  12.        srcstr# -- a string to be replaced where # can vary from 0 - F.
  13.           srcstr# can be straight ASCII, or the following special cases
  14.           preceded by a '\' character:
  15.  
  16.              \Xhh[hh]\ - hh is a sequence of hexadecimal binary bytes
  17.              \Ffilename\ - string should be read from file called filename
  18.              \Llong\ - long is a long integer (4 bytes)
  19.              \Iint\ - int is a short integer (2 bytes)
  20.              \Uuint\ - uint is an unsigned short integer (2 bytes)
  21.              \Hhex\ - hex is a hexadecimal integer (2 bytes)
  22.              \Ddouble\ - double is a double length floating point number
  23.              \Eexp\ - exp is a short floating point number
  24.  
  25.        dststr# -- the string with which to replace srcstr#
  26.           dststr# is specified using the same rules as srcstr#
  27.  
  28. ----------------------------------------------------------------------
  29. Example:  To convert "let CONSTANT EQUAL ??" into "#define CONSTANT 1"
  30.     "MUTATE filename -s0=let -d0=#define -s1=EQUAL -s2=?? -d2=1"
  31.  
  32. Example:  To convert "let CONSTANT EQUAL ?? /*" into "CONSTANT = 1 ;*"
  33.     "MUTATE filename -s0=let -s1=EQUAL -d1== -s2=?? -d2=1 -s3=/* -d3=;*"
  34.  
  35. ----------------------------------------------------------------------
  36. MUTATE can also perform extensive data conversion from one format into
  37. another. For example, if you have a Sprint word processing file and you
  38. want to convert it into Ami-Pro format, use MUTATE to convert all of your
  39. HEADINGA tags to Chapter styles.  Also, if you have a datafile with a
  40. floating point number that doesn't occur anywhere else in the file and you
  41. want to change it without hiring the programmer to write a special program.
  42. Just use MUTATE's \Dnumber feature.  This program works with any binary or
  43. ASCII file.
  44.  
  45. ======================================================================
  46. The best way to describe MUTATE, is to put it in the context of
  47. problems you may have had in the past or may currently have.
  48.  
  49. Have you ever wanted to:
  50.  
  51.   - Convert a number in binary file into another number without having
  52.   to write a special program or pay a programmer to do it.
  53.  
  54.   - Change all of the occurences of a string into another string in
  55.   text files.
  56.  
  57.     Example:  Your application uses numerous ASCII configuration files
  58.     that list a number of directories.  If you have just moved the
  59.     application to another drive and you need to change the drive id
  60.     in front of all of the paths, you must change all of the
  61.     configuration files.  While you can do this with most text
  62.     editors, the process becomes tedious when you have to do it over
  63.     and over.
  64.  
  65.     Example:  You have a program that is conditionally compiled based
  66.     on some #define's and equ's in .H and .ASI files.  If you want to
  67.     change a single occurence of a compiler directive and must change
  68.     the C AND assembly language definition files, this is also a task
  69.     that any good editor can handle, but one that becomes tedious when
  70.     it must be performed often.
  71.  
  72.   - Massage data in text or binary files, eliminating redundant
  73.   spaces, carriage returns, and tabs, or converting formatting
  74.   information from one word-processor to another.
  75.  
  76.   - Perform batch search-and-replaces on configuration or .BAT files
  77.   to reflect current path information when installing software.
  78.  
  79. Then MUTATE is for you...
  80.  
  81. ----------------------------------------------------------------------
  82. For example, I recently had a large text file to put through a
  83. formatter for typesetting.  Unfortunately, the file was created by
  84. someone who, as an expert IBM Selectric typist didn't know that 1's
  85. are ones and l's are els.  In addition, the creator of this file
  86. didn't know that putting multiple tabs in a row or many spaces after
  87. tabs can wreak havoc on most reasonable formatting programs.  I used
  88. mutate to convert l's to 1's by setting a configuration file
  89. MUTATE.CFG like this:
  90.  
  91. -s0=l0
  92. -d0=10
  93. -s1=l1
  94. -d1=11
  95. etc.
  96.  
  97. By converting l# and #l combinations to 1# and #1 combinations,
  98. respectively, and continuing the MUTATE until no more changes were
  99. made, I was able to convert all of the pseudo-numbers in the file into
  100. actual numbers.
  101.  
  102. Then, by converting tab-space sequences into a single tab, I was able
  103. to eliminate those pesky extra spaces.  The general idea was to keep
  104. MUTATEing until no more changes were made.
  105.  
  106. Then, to get the file from Sprint format (yes, some people still use
  107. Sprint) into Ami Professional (not the best tool for a large task), I
  108. just MUTATEed the HEADINGA strings into <Chapter> strings, being
  109. careful to put the appropriate binary combinations surrounding the
  110. HEADINGA.
  111.  
  112. In a relatively short time, the document was "massaged" into a format
  113. that AmiPro could handle.
  114.  
  115.  
  116. ----------------------------------------------------------------------
  117. Another example is that a GIS database that I occasionally use, has
  118. quite a few configuration files that tell it where to find data, map
  119. and other files.  You can imagine that with 30 or more files to
  120. change, pointing all of your data to a different directory can get
  121. somewhat tedious.
  122.  
  123. Once again, MUTATE performs the changes quickly and with ease from the
  124. DOS command-line.
  125.  
  126.  
  127. ----------------------------------------------------------------------
  128. Finally, HXJ's ECOMM communications software (we will have a shareware
  129. version out very shortly) makes use of a batch file to invoke the
  130. necessary communications TSR's.  When installing the software, we use
  131. MUTATE to convert the batch files... making them load the correct TSR's
  132. and direct the TSR's to look in the correct directories for
  133. configuration information.
  134.  
  135.  
  136. ----------------------------------------------------------------------
  137. You can see the exact syntax of MUTATE by simply typing MUTATE with
  138. nothing after it.  MUTATE also looks for a MUTATE.CFG file for
  139. command-line options in its own or the current directory (one per
  140. line, comment them out by NOT starting them in the first column).
  141.  
  142. If you have an application for this type of program please feel free
  143. to try MUTATE to see if it does the job you need.  But, remember that
  144. MUTATE is only free for NON-commercial use or for evaluation purposes.
  145. If you use MUTATE in your business or for any other commercial use, we
  146. ask that you pay the $15.00 registration fee in order to be license
  147. the software.
  148.  
  149. We also ask that you don't distribute MUTATE in any form other than
  150. the original zipped MUTATE.ZIP format.
  151.  
  152. If you want to use MUTATE with your own software, we make distribution
  153. and site licenses available at very reasonable terms.
  154.  
  155. Also, part of the reason that MUTATE is so large (39K) is that it
  156. includes floating point math libraries.  We make a non-shareware
  157. version (27K) available without floating point capabilities to all of
  158. our registered users for a nominal $5.00 shipping and handling fee.
  159.  
  160. Finally, remember that it is very easy to rip off a program to do any
  161. of MUTATE's functions in a matter of hours (for a good programmer),
  162. but it is considerably more trouble to produce a finished, fully
  163. debugged product with thorough on-line help / documentation and such
  164. niceties as allowing wildcard'ed filenames.  It is only with your
  165. support that programmers will continue to go to the trouble of making
  166. finished products available as shareware.
  167.  
  168. We also make it as easy as possible for you to register your copy of
  169. MUTATE, either send your send check or money order to:
  170.  
  171.                     HXJ, Inc.
  172.                     966 Hungerford Drive, Suite 3
  173.                     Rockville, Maryland 20850
  174.  
  175. or,
  176.  
  177. call HXJ at (301) 424-0070 to charge MUTATE on your Visa or Mastercard.
  178.  
  179.  
  180. Disclaimer
  181. ----------------------------------------------------------------------
  182. Neither HXJ, Inc. nor the author of the program make any guarantees
  183. that MUTATE is fit for any particular purpose.  In no event will HXJ,
  184. Inc. or the author be liable for any special, incidental, or
  185. consequential damages resulting from the use of this program.
  186.  
  187.  
  188. Gratuitous advertisement
  189. ----------------------------------------------------------------------
  190. Look for ECOMM, coming soon to a bulletin board near you.
  191.  
  192. ECOMM is a real-time e-mail delivery system that delivers mail
  193. directly to your computer while you work on something else (without
  194. requiring special multi-tasking software.)
  195.  
  196. Even better than all that, ECOMM lets you design custom messages that
  197. look and behave exactly how you want them.  You can design messages
  198. that mimic database records and use ECOMM's external hooks to bring
  199. the data directly into your database when messages arrive.
  200.  
  201. ECOMM also works over most communications hardware including:
  202.   - packet radios
  203.   - Hayes modems (on normal or cellular telephones)
  204.   - serial null-modem connections
  205.   - various permutations of the above systems (on satellites, etc.)
  206.  
  207. ECOMM also comes in a network e-mail version that lets you send
  208. messages to someone in their car as easily as sending them across a
  209. LAN.
  210.  
  211. We are putting the finishing touches on it and beta-testing.
  212.  
  213. ECOMM 1.10 will be available at the end of March 1991.
  214.